﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lxzhu.OpenGL
{
    public enum VersionComponent
    {
        GL_VENDOR = 0x1F00,
        GL_RENDERER = 0x1F01,
        GL_VERSION = 0x1F02,
        GL_EXTENSIONS = 0x1F03
    }
    public enum PrimitiveType
    {
        GL_POINTS = 0x0000,
        GL_LINES = 0x0001,
        GL_LINE_LOOP = 0x0002,
        GL_LINE_STRIP = 0x0003,
        GL_TRIANGLES = 0x0004,
        GL_TRIANGLE_STRIP = 0x0005,
        GL_TRIANGLE_FAN = 0x0006,
        GL_QUADS = 0x0007,
        GL_QUAD_STRIP = 0x0008,
        GL_POLYGON = 0x0009
    }
    public enum MatrixMode
    {
        GL_PROJECTION = 0,
        GL_MODELVIEW = 1,
        GL_TEXTURE = 2
    }
    [Flags]
    public enum BufferBit
    {
        GL_COLOR_BUFFER_BIT = 0x00004000,
        GL_DEPTH_BUFFER_BIT = 0x00000100,
        GL_ACCUM_BUFFER_BIT = 0x00000200,
        GL_STENCIL_BUFFER_BIT = 0x00000400,
    }
    public enum ErrorCode
    {
        GL_NO_ERROR=Gl.GL_NO_ERROR,
        GL_INVALID_ENUM=Gl.GL_INVALID_ENUM,
        GL_INVALID_VALUE=Gl.GL_INVALID_VALUE,
        GL_INVALID_OPERATION = Gl.GL_INVALID_OPERATION,
        GL_STACK_OVERFLOW = Gl.GL_STACK_OVERFLOW,
        GL_STACK_UNDERFLOW = Gl.GL_STACK_UNDERFLOW,
        GL_OUT_OF_MEMORY = Gl.GL_OUT_OF_MEMORY
    }
    public enum Face
    {
        GL_FRONT=Gl.GL_FRONT,
        GL_BACK=Gl.GL_BACK ,
        GL_FRONT_AND_BACK=Gl.GL_FRONT_AND_BACK
    }
    public enum PolygonMode
    {
        GL_POINT=Gl.GL_POINT,
        GL_LINE=Gl.GL_LINE,
        GL_FILL=Gl.GL_FILL
    }
    public enum Direction
    {
        GL_CW=Gl.GL_CW,
        GL_CCW=Gl.GL_CCW
    }
    public enum ArrayType
    {
        GL_VERTEX_ARRAY = Gl.GL_VERTEX_ARRAY,
        GL_COLOR_ARRAY = Gl.GL_COLOR_ARRAY,
        GL_SECONDARY_COLOR_ARRAY = Gl.GL_SECONDARY_COLOR_ARRAY,
        GL_INDEX_ARRAY = Gl.GL_INDEX_ARRAY,
        GL_NORMAL_ARRAY = Gl.GL_NORMAL_ARRAY,
        GL_FOG_COORDINATE_ARRAY = Gl.GL_FOG_COORDINATE_ARRAY,
        GL_TEXTURE_COORD_ARRAY = Gl.GL_TEXTURE_COORD_ARRAY,
        GL_EDGE_FLAG_ARRAY = Gl.GL_EDGE_FLAG
    }
    public enum ArrayUnit
    {
        TWO = 2,
        THREE = 3,
        FOUR = 4
    }
    /// <summary>
    /// OpenGL中所有的基本数据类型
    /// </summary>
    public enum DataType
    {
        GL_BOOL = Gl.GL_BOOL,
        GL_BYTE = Gl.GL_BYTE,
        Gl_UNSIGNED_BYTE=Gl.GL_UNSIGNED_BYTE,
        GL_SHORT = Gl.GL_SHORT,
        GL_UNSIGNED_SHORT = Gl.GL_UNSIGNED_SHORT, 
        GL_INT = Gl.GL_INT,
        GL_UNSIGNED_INT=Gl.GL_UNSIGNED_INT,              
        GL_FLOAT = Gl.GL_FLOAT,
        GL_DOUBLE = Gl.GL_DOUBLE
    }
    /// <summary>
    /// 混合数组数据格式
    /// </summary>
    public enum InterleavedFormat
    {
        GL_V2F = Gl.GL_V2F,
        GL_V3F = Gl.GL_V3F,
        GL_C4UB_V2F = Gl.GL_C4UB_V2F,
        GL_C4UB_V3F = Gl.GL_C4UB_V3F,
        GL_C3F_V3F = Gl.GL_C3F_V3F,
        GL_N3F_V3F = Gl.GL_N3F_V3F,
        GL_C4F_N3F_V3F = Gl.GL_C4F_N3F_V3F,
        GL_T2F_V3F = Gl.GL_T2F_V3F,
        GL_T4F_V4F = Gl.GL_T4F_V4F,
        GL_T2F_C4UB_V3F = Gl.GL_T2F_C4UB_V3F,
        GL_T2F_C3F_V3F = Gl.GL_T2F_C3F_V3F,
        GL_T2F_N3F_V3F = Gl.GL_T2F_N3F_V3F,
        GL_T2F_C4F_N3F_V3F = Gl.GL_T2F_C4F_N3F_V3F,
        GL_T4F_C4F_N3F_V4F = Gl.GL_T4F_C4F_N3F_V4F
    }
    public enum Capability
    {
        GL_POINT_SMOOTH = Gl.GL_POINT_SMOOTH,
        GL_LINE_SMOOTH = Gl.GL_LINE_SMOOTH,
        GL_LINE_STIPPLE=Gl.GL_LINE_STIPPLE,
        GL_POLYGON_STIPPLE=Gl.GL_POLYGON_STIPPLE,
        Gl_CULL_FACE=Gl.GL_CULL_FACE,
    }

    /// <summary>
    /// 用于glGet函数的查询参数
    /// </summary>
    public enum ConfigurationOrState
    {
        GL_SMOOTH_POINT_SIZE_RANGE=Gl.GL_SMOOTH_POINT_SIZE_RANGE,
        GL_POINT_SIZE=Gl.GL_POINT_SIZE
    }
}
